/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package sk.ke.szatmary.peter.jclac.simpleCiphers.examples;

import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import sk.ke.szatmary.peter.jclac.simpleCiphers.Caesar;
import sk.ke.szatmary.peter.jclac.simpleCiphers.core.SimpleCipher;
import sk.ke.szatmary.peter.jclac.simpleCiphers.SimpleCipherAttr;
import sk.ke.szatmary.peter.jclac.simpleCiphers.core.SimpleCipherException;

/**
 *
 * @author nue
 */
public class CaesarExampleAppB {
    public static void main(String[] args) {
    
        List<SimpleCipherAttr> listAttr;
        listAttr = new ArrayList<SimpleCipherAttr>();
        listAttr.add(new SimpleCipherAttr(-53000));
        try {
            String plain = "plain text 4";
            SimpleCipher caesar = new Caesar(listAttr);
            String encrypted = caesar.getEncrypted(plain);
            String decrypted = caesar.getDecrypted(encrypted);
            
            List<SimpleCipherAttr> list = caesar.getAttributes();
            System.out.println("INPUT ATTRIBUTE: "+list.get(0).getValue());
            System.out.println("TRANSFORMED ATTRIBUTE: "+list.get(0).getChangedValue());
         
        } catch (SimpleCipherException ex) {
            Logger.getLogger(CaesarExampleAppB.class.getName()).log(Level.SEVERE, null, ex);

        }
        
    }
}
